<template>
  <i :class="classes" :style="styles"></i>
</template>

<script>
export default {
  name: 'IconFont',
  props: {
    icon: {
      type: String,
      default: ''
    },
    size: {
      type: Number,
      default: 16
    },
    color: {
      type: String,
      default: '#515a6e'
    }
  },
  computed: {
    classes() {
      return [
        'iconfont',
        `icon-${this.icon}`
      ]
    },
    styles() {
      return {
        color: this.color,
        fontSize: `${this.size}px`
      }
    }
  }
}
</script>
